"""
=================================================
@Author: Zhenzhou Liu
@Date: 2025-01-10
@Description：
==================================================
"""
from typing import List
import sys
# 增大Python默认递归深度1000的限制
sys.setrecursionlimit(100000)

def get_and_remove_last_element(stack: List) -> int:
    x = stack[-1]
    stack.pop()
    if stack:
        last = get_and_remove_last_element(stack)
        stack.append(x)
        return last
    else:
        return x

def reverse(stack: List) -> None:
    if not stack:
        return
    x = get_and_remove_last_element(stack)
    reverse(stack)
    stack.append(x)


if __name__ == '__main__':
    n = int(input().strip())
    stack = list(map(int, input().strip().split()))
    reverse(stack)

    for i in range(n):
        if i > 0:
            print(' ', end='')
        print(stack[-1], end='')
        stack.pop()


